<template>
        <!-- mv标题 -->
        <div class="mv_title" v-if="video_b">
            <div class="comtent">
              <p class="song_name">{{video_b.title}}</p>
              <p class="singerBox"><a href="#" class="singer">{{video_b.artists[0].name}}</a> <span class="palyNum">{{video_b.totalViews}}次播放</span></p>
            </div>
            <div class="share">
              <i class="iconfont icon-fenxiang"></i>
              <p >分享</p>
            </div>
        </div>
</template>
<script>
import jsonp from "jsonp";
export default {
  name: "mv_title",
  data() {
    return {
      mv: ""
      // video_b:JSON.parse(sessionStorage.getItem("video_b")),
    };
  },
  computed: {
    video_b() {
      return JSON.parse(sessionStorage.getItem("video_b"));
    }
  },
  created() {
    if (Object.keys(this.$store.state.video).length !== 0) {
      if (
        JSON.parse(sessionStorage.getItem("video_b")) != this.$store.state.video
      ) {
        sessionStorage.setItem(
          "video_b",
          JSON.stringify(this.$store.state.video)
        );
      }
    }
  }
};
</script>
<style lang='scss' scoped >
// mv标题
.mv_title {
  width: 100%;
  padding: 0.6rem 0.4rem;
  overflow: hidden;
  box-sizing: border-box;
  background: #fff;
  .comtent {
    float: left;
    width: 90%;
    .song_name {
      font-size: 15px;
      width: 90%;
    }
    .singerBox {
      margin-top: 0.2rem;
      font-size: 0;
      span {
        font-size: 0.3rem;
      }
      .singer {
        font-size: 13px;
        color: #568fca;
      }
      .palyNum {
        margin-left: 0.2rem;
        color: #a4a4a4;
      }
    }
  }
  .share {
    width: 10%;
    float: right;
    text-align: center;
    p {
      font-size: 10px;
      margin-top: 0.2rem;
    }
    i {
      font-size: 20px;
    }
  }
}
</style>

